//
//  XLHistoryEditHeaderView.m
//  History
//
//  Created by 于鹏 on 2017/9/4.
//  Copyright © 2017年 YIVIEW. All rights reserved.
//

#import "XLHistoryEditHeaderView.h"
//#import <XLBaseModule/XLAppMacro.h>
#import "XLAppMacro.h"

@interface XLHistoryEditHeaderView ()



@property (unsafe_unretained, nonatomic) IBOutlet UIButton *selectAllBtn;
@property (unsafe_unretained, nonatomic) IBOutlet UIButton *collectBtn;
@property (unsafe_unretained, nonatomic) IBOutlet UIButton *deleteBtn;

@end

@implementation XLHistoryEditHeaderView

+ (instancetype)creatEditView {
    return [[kXLBundle loadNibNamed:NSStringFromClass([self class]) owner:self options:nil]lastObject];
}

- (IBAction)selectAllAction:(UIButton *)sender {
    if (self.editBlock) {
        self.editBlock(sender, XLHistoryEditTypeSelectAll);
    }
}
- (IBAction)collectAction:(UIButton *)sender {
    if (self.editBlock) {
        self.editBlock(sender, XLHistoryEditTypeCollect);
    }
}
- (IBAction)deleteAction:(UIButton *)sender {
    if (self.editBlock) {
        self.editBlock(sender, XLHistoryEditTypeDelete);
    }
}

- (void)setSelectAllBtnIsSelect:(BOOL)selectAllBtnIsSelect {
    _selectAllBtnIsSelect = selectAllBtnIsSelect;
    self.selectAllBtn.selected = selectAllBtnIsSelect;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
